package com.ituzhi.mqtt.server.gateway;

import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.handler.annotation.Header;

/**
 * packageName com.ituzhi.mqtt.server.gateway
 *
 * @author 死道友不死贫道
 * @version JDK 17
 * @className MqttGateway
 * @date 2025-01-23
 * @description TODO
 */
@MessagingGateway(defaultRequestChannel = "mqttOutboundChannel")
public interface  MqttGateway {

    void sendToMqtt(@Header(value = MqttHeaders.TOPIC) String topic, String payload);

    void sendToMqtt(@Header(value = MqttHeaders.TOPIC) String topic, @Header(value = MqttHeaders.QOS) int qos, String payload);
}